#include <algorithm>
#include <cstdio>
using namespace std;

const int kMaxN = 50000 + 10;

int sum[kMaxN];

int main() {
  int n, q;

  scanf("%d%d", &n, &q);
  for (int i = 1; i <= n; i++) {
    int b;

    scanf("%d", &b);
    sum[i] = sum[i - 1] + b;
  }
  for (int i = 0; i < q; i++) {
    int t;

    scanf("%d", &t);
    printf("%d\n", lower_bound(sum, sum + n + 1, t + 1) - sum);
  }
  return 0;
}